<style lang="scss" scoped>
	.item {
		height: 340rpx;
		border-radius: 10rpx;
		overflow: hidden;
		position: relative;

		.picture {
			width: 100%;
			height: 100%;
		}

		.mask {
			position: absolute;
			bottom: 0;
			z-index: 1;
			width: 100%;
			height: 70rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: rgba(255, 255, 255, 0.2);
			backdrop-filter: blur(10rpx);
			font-weight: 600;
			color: #fff;

		}

		.tag {
			left: 0;
			top: 0;
			z-index: 1;
			position: absolute;
			background-color: rgba(250, 129, 90, 0.7);
			backdrop-filter: blur(10rpx);
			color: #fff;
			padding: 4rpx 10rpx;
			border-radius: 0 0 20rpx 0;
			font-size: 24rpx;
		}

	}

	.more {
		.mask {
			height: 100%;
			width: 100%;
			display: flex;
			flex-direction: column;
			backdrop-filter: blur(20rpx);
		}
	}
</style>

<template>
	<view class="item" v-if='!isMore' @click="goClassList">
		<view class="mask">
			明星美女
		</view>
		<view class="tag">
			1天前更新
		</view>
		<image class="picture" src="../../common/images/classify1.jpg" mode="aspectFill"></image>
	</view>
	<view class="item more" v-if='isMore' @click="goClassify">
		<view class="mask">
			<uni-icons type='more-filled' color="#fff" size="36"></uni-icons>
			更多
		</view>

		<image class="picture" src="../../common/images/more.jpg" mode="aspectFill"></image>
	</view>
</template>

<script setup>
	import {
		defineProps
	} from 'vue';
	defineProps({

		isMore: {
			type: Boolean,
			default: false
		}

	})

	const goClassList = () => {
		uni.navigateTo({
			url: '/pages/classify/classList/classList'
		})
	}
	const goClassify = () => {
		uni.reLaunch({
			url: '/pages/classify/classify'
		})
	}
</script>